package com.ibeeking.found.msg.rest.controller.v1;

import com.ibeeking.found.msg.rest.service.IWxMpMessageReturnService;
import com.ibeeking.found.msg.service.common.query.WxMpMessageReturnPageQuery;
import com.ibeeking.found.msg.service.common.vo.WxMpMessageReturnVO;
import com.ibeeking.nematos.constants.enums.OperateLogTypeEnum;
import com.ibeeking.nematos.log.annotation.Log;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;

//消息回复的查询
@Deprecated
@RestController
@RequestMapping("/mp/messagereturn/v1")
public class WxMpMessageReturnController {

    @Resource
    private IWxMpMessageReturnService wxMpMessageReturnServiceImpl;

    @Log(logType = OperateLogTypeEnum.MODIFY, describe = "预留公众号被动回复消息回调接口")
    @PostMapping(value = "/mp_return")
    public Object messageCallBack(MultipartFile file) {
        return wxMpMessageReturnServiceImpl.messageCallBack(file);
    }

    @Log(logType = OperateLogTypeEnum.QUERY,describe = "查询被动回复消息")
    @PostMapping(value = "/pageList")
    public Page<WxMpMessageReturnVO> pageList(@RequestBody WxMpMessageReturnPageQuery basePage){
        return wxMpMessageReturnServiceImpl.pageList(basePage);
    }


}
